ot_remote_builtin_show_url: autofree context
authorSimon McVittie <smcv@debian.org>
Thu, 27 Oct 2016 11:31:52 +0000 (12:31 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Sun, 30 Oct 2016 22:11:15 +0000 (22:11 +0000)
Leak found with valgrind memcheck.

Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #556
Approved by: cgwalters

src/ostree/ot-remote-builtin-show-url.c

index a4b447c87be42daa18a91f1309aac2d6d324acde..401dfb0b166cdd5a048ff6763d01ae575febf4c9 100644 (file)
@@ -32,7 +32,7 @@ static GOptionEntry option_entries[] = {
 gboolean
 ot_remote_builtin_show_url (int argc, char **argv, GCancellable *cancellable, GError **error)
 {
-  GOptionContext *context;
+  g_autoptr(GOptionContext) context = NULL;
   glnx_unref_object OstreeRepo *repo = NULL;
   const char *remote_name;
   g_autofree char *remote_url = NULL;